1. Field of the Invention
The present invention relates to a communication apparatus and communication control method that provides application communication using TCP/IP protocol communication.
2. Description of the Related Art
In the present specification, “application device” refers to a device that is connected to a network and is capable of application communication in which TCP/IP protocol is the lower-layer protocol.
In general, TCP/IP protocol processing is often implemented through software called a TCP/IP protocol stack. FIG. 2 shows a hierarchy model of software processing in TCP/IP communication. In FIG. 2, the TCP/IP protocol stack is expressed by the software processing in a range indicated by the number 201. 202 in FIG. 2 is an application layer, and is application communication protocol processing that uses TCP/IP communication. Many protocols exist, including standard protocols such as Hyper Text Transfer Protocol (HTTP), protocols uniquely defined and implemented on an application-by-application basis, and so on.
203 is a socket layer, handling software interface processing through which the application layer process uses the lower-layer TCP/IP protocol. “Socket” refers to an end-point in TCP/IP communication, and can be identified by the IP address of the network device performing TCP/IP communication and the port numbers allocated in each instance of TCP/IP communication in the device. The socket interface is an interface for application software to handle TCP/IP communication, and is supported in many operating systems (OS).
204 is a transport layer protocol processing, and 205 is a network layer protocol processing. In TCP/IP, TCP and UDP (User Datagram Protocol) exist as protocols in the transport layer, and IPv4 (IP version 4) and IPv6 (IP version 6) exist as protocols in the network layer. 206 is a link layer, and is a communication protocol processing dependent on the physical medium of the network. 207, which is the lowest layer, is driver software for controlling the physical medium access control (MAC) device of the network.
Conventionally, TCP/IP communication has been realized in an application device by implementing the TCP/IP protocol processing by software executed by a central processing unit (CPU) included within the application device. Even now, in devices such as personal computers that are rich in processing resources, TCP/IP communication is realized by TCP/IP protocol processing incorporated within the OS.
However, in recent years, the amount of data sent and received by application devices has increased, and the processing load placed on the CPU by software processes for TCP/IP communication has become extremely large. For example, video server devices such as network cameras and network video distribution servers, digital audio/video (AV) devices such as network media players and network-compatible hard disk recorders, and the like have come into wide use. Moreover, in devices such as these that input and output video through a network, the processing load involved in communication processing for sending and receiving high-resolution image data in real time is growing.
As a response to this increase in the CPU processing load for TCP/IP communication, a method of offloading TCP/IP protocol processing is being implemented, with the aim of reducing the load on the CPU of the application device and increasing TCP/IP communication throughput. In TCP/IP communication, “offloading” refers to processing mainly the software indicated by the number 208 in FIG. 2 with a separate processing device rather than with the CPU of the application device. For example, there are cases where offloaded processing is performed by a microprocessor different from the CPU of the application device, and cases where parts in which the computational amount of TCP/IP processing in the software is large are processed at high speed by a dedicated hardware circuit.
U.S. Pat. No. 6,941,386 discloses a method related to an intelligent network interface card (INIC) that is installed in a communication processing device included in a host device or an external expansion interface of the host device. With this method, TCP/IP protocol processing through hardware circuit processing is realized, and the software processing of the TCP/IP protocol stack performed by the CPU of the host device is offloaded.
In this conventional example, the scheme is such that a generic protocol stack executed by the CPU is retained and the TCP/IP protocol processing realized by software is executed by the CPU. In other words, two types of processing are provided: slow-path processing performed by the generic protocol stack, and fast-path processing performed by hardware processing. This is because TCP/IP protocol processing is of a scope that cannot be supported by hardware processing or the cost of implementation as hardware cannot be justified.
In addition, in recent years, there are cases where TCP/IP protocol processing performed by the CPU of the application device is completely offloaded by dedicated hardware, thereby reducing CPU resource usage for TCP/IP communication to a minimum.
However, in the case of an integrated device in which strict limitations are placed on the cost of hardware resources, a scheme that offloads TCP/IP protocol processing with hardware limits the number of communication connections that can be processed to a small number. Thus, there is a problem that the application device cannot open many communication connections and execute communication simultaneously.
Furthermore, offloading all of the protocol processing in the range indicated by the number 208 in FIG. 2, which has conventionally been processed by software, with completely dedicated hardware results in the scale of the hardware circuit becoming large. Therefore, in terms of cost, such a scheme is inappropriate in an integrated device in which strict limitations are placed on the hardware resources.